﻿namespace TestLeakApp
{
    public interface IBox
    {
        byte[] ReceivedBuffer { get; set; }
        byte ReceivedLength { get; }

        bool ChargeAll();
        bool Check();
        bool DischargeAll();
        bool GetVersion();
        bool HandShake();
        bool InitialAll();
        bool LCRTestChannel(byte channel, bool on);
        bool LCTestAll();
        bool LcTestChannel(byte channel, bool on);
        void PackDataToBuffer(ref byte[] Buffer, ref byte total_len, byte addr, byte cmd, byte data_len, byte[] data_list);
        bool SwitchToLCR();
        void UnPackData(ref PackClass pack, byte[] src, byte len);
        bool WaitAndGetState(int dly);
    }
}